Distinct Permutations of a String Code